Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
C++ Tutorial
1) Array
2) Bitset
3) Class
4) Data Types
5) Deque
6) Development
7) Exceptions
8) File Stream
9) Function
10) Language Basics
11) List
12) Map Multimap
13) Operator Overloading
14) Operators Statements
15) Pointer
16) Queue Stack
17) Set Multiset
18) STL Algorithms Binary Search
19) STL Algorithms Heap
20) STL Algorithms Helper
21) STL Algorithms Iterator
22) STL Algorithms Merge
23) STL Algorithms Min Max
24) STL Algorithms Modifying Sequence Operations
25) STL Algorithms Non Modifying Sequence Operations
26) STL Algorithms Sorting
27) STL Introduction
28) String
29) Structure
30) Template
31) Valarray
32) Vector
Vector
1) Access field for vector
2) Access the elements of a vector through an iterator
3) Accessing Elements in a Vector Using Array Semantics
4) Accessing Elements in a Vector Using Pointer Semantics (Iterators)
5) Accessing the Back of a Vector
6) Add all the elements from vector Two to the end of vector One
7) Add class to a vector and then delete them one by one
8) Add elements to the end of vector with push_back
9) Append one more element This causes reallocation
10) Assign elements in int array to vector
11) Assign elements in vector a value through an iterator
12) Assign value to the last element
13) Bidirectional random access iterators
14) Call member function for each element in vector
15) Call the virtual function from classes stored in a vector
16) Change contents of vector through an iterator
17) Change element with const iterator
18) Change element with pointer
19) Checked and Unchecked Access of a Vector
20) Clear a vector
21) Combine insert and end to add elements to the end of vector
22) Compare two vector
23) Compare two vectors
24) Computing an inner product of tuples represented as vectors
25) Computing the sum with template iterators
26) Const iterators
27) Constructing a Container That Has Identical Elements
28) Constructing a Container That Has Specified Values
29) Converting Between Iterators and Indexes in a Vector
30) Converting to C-style strings
31) Count elements in a vector by value
32) Creates a vector of 10 ints with value 100
33) Creates a vector of ints with zero elements
34) Cycle through v in the forward direction using an iterator
35) Cycle through v in the reverse direction using a reverse_iterator
36) Declare a reverse iterator to the vector of char
37) Declare an iterator to a vectorchar
38) Delete the first element of the vector
39) Delete the last element of the vector
40) Demonstrating STL vector constructors with a user-defined type
41) Demonstrating STL vector constructors with a user-defined type and showing copying explicitly
42) Demonstrating STL vector copying constructors
43) Demonstrating the generic find algorithm with a vector
44) Demonstrating the simplest STL vector constructors
45) Demonstrating the STL vector back and pop_back operations
46) Demonstrating the STL vector capacity
47) Demonstrating the STL vector capacity and reserve functions
48) Demonstrating the STL vector front and erase operations
49) Demonstrating the STL vector push_back functions
50) Demonstration of size() and capacity()
51) Display contents of vector through an iterator
52) Dynamically allocated vector begins with 0 elements
53) Elements Being Created, Assigned, and Destroyed
54) Ensure theres room for at least 1000 elements
55) Erase adjacent duplicates
56) Erase all value in a vector more than three standard deviations greater than the mean
57) Erase all value in a vector more than three standard deviations less than the mean with erase() remove_if() and bind2nd
58) Erase first element
59) Erase the numbers 2 through 5 in v1
60) Fill elements in a vector with custom generator
61) Find a sample integer 3 in the vector using the find algorithm
62) Find a value in integer vector
63) Find element in a vector using a linear search
64) Find the first element in the range (first, last + 1) that matches value
65) Find the first even number in the collection
66) Find the smallest number
67) Find_if, bind2nd and greater_equal
68) For_each element in a vector apply custom function
69) Force the vector to reallocate
70) Get an iterator that points to the maximum with max_element
71) Get the first element in a vector
72) Get the last element in a vector
73) Get the last element in the vector
74) Illustrating normal and reverse iteration
75) Inner product of a vector and another vector
76) Insert 10 duplicate value to vector
77) Insert 2 numbers of value 45 at the end
78) Insert 25 at the beginning
79) Insert and erase
80) Insert element by index
81) Insert elements from array
82) Insert one vector to another vector
83) Insert the contents of the array into the end of the vector
84) Insert two elements from another container in position [1]
85) Instantiate a vector to 5 elements taken from another
86) Instantiate a vector with 10 elements (it can grow larger)
87) Instantiate a vector with 10 elements, each initialized to 90
88) Instantiate a vector with 4 elements, each initialized to 90
89) Instantiate one vector and initialize it to the contents of another
90) Is the search result pointing to the end of a vector
91) Iterators for vector
92) Locate maximum element in a vector
93) Locate minimum element in a vector
94) Loop thourgh all elements in a vector using
95) Loop through all elements in a vector in reverse order by using rbegn, rend
96) Loop through all elements in a vector using operator [] instead of operator
97) Make a big vector and then deallocate all its memory
98) Make a big vector and then minimize its memory
99) Make the vector as large as possible without reallocating
100) Merge the elements of NumbersVestor and NumbersList and place the results in NumbersDeque
101) Mutating Sequence Algorithm
102) Object vector
103) Obtain an iterator to the start of vector
104) Pass vector to a function
105) Perform the heapsort with push_heap and pop_heap
106) Pop_back from a vector
107) Put more values onto the end of the vector,it will grow as needed
108) Random access of a vector
109) Random number generation in quantitative finance
110) Read keyboard input to a vector
111) Remove(delete) all elements in the vector
112) Reserve memory for five elements to avoid reallocation
113) Reserving Space in a Vector
114) Returns all values within a range
115) Reverse all elements in a vector by using reverse
116) Reverse an array
117) Reverse iterators
118) See if iterator is still in the same spot of memory
119) Set Element Values in a vector Using Array Semantics
120) Show statistics about vector
121) Shuffle the elements in a random order
122) Sort NumbersVestor, mersge requires the sequences to be sorted
123) Sort the smallest 4 elemetns in the Numbers and copy the results in Result
124) Store a class object in a vector
125) Swap two vector
126) The adjacent difference of the vector
127) The first and last element in vector as pointed to by begin() and end() - 1
128) The first and last element in vector as pointed to by rbegin() and rend() - 1
129) The Instantiation of vectorbool
130) The use of the subscripting operator
131) Traverse reverse backward
132) Traverse reverse randomly
133) Use a reverse iterator to show the contents of v in reverse
134) Use const_iterator to loop through the vector
135) Use count to determine the number of 0s in the vector
136) Use for_each function to print all elements in a vector
137) Use generic vector to create vector of chars
138) Use generic vector to create vector of integers
139) Use generic vector to create vector of strings
140) Use indexer to add elements to a vector
141) Use indexer to reference elements in a vector
142) Use indexer to update element in the vector
143) Use lower_bound on vector
144) Use merge with back_inserter
145) Use std
146) Use the count_if algorithm with the unary predicate IsEven
147) Use toupper function to convert all elements in a char vector to upper case
148) Use unique_copy to remove duplicate words
149) Use upper_bound on vector
150) Use vector as an array for user-defined object
151) Use vector at to change element in the vector
152) Use vector to store the calsses in a hiearchy
153) Using a Vector of Booleans
154) Using pop_back to Erase the Last Element
155) Using the for_each() Algorithm
156) Using the vectorbool
157) Vector
158) Vector assignment
159) Vector Creation and Element Access
160) Vector declaration
161) Vector Init Array
162) Vector Insert Erase Sort
163) Vector of 10 strings
164) Vector size before and after elements insertion
165) Vector with 10 objects
166) Vectors copy constructor